package com.yanmaohu.yulia.bean;

import com.yanmaohu.yulia.statement.SqlSchemaDefinitionStatement;

/**
 * @author Bright Lee
 */
public final class UserDefinedOrderingDefinition implements SchemaElement, SqlSchemaDefinitionStatement {

    private int beginIndex;
    private int endIndex;
    private SchemaQualifiedName schemaResolvedUserDefinedTypeName;
    private OrderingForm orderingForm;

    public UserDefinedOrderingDefinition(int beginIndex,
                                         SchemaQualifiedName schemaResolvedUserDefinedTypeName,
                                         OrderingForm orderingForm) {
        this.beginIndex = beginIndex;
        this.endIndex = orderingForm.getEndIndex();
        this.schemaResolvedUserDefinedTypeName = schemaResolvedUserDefinedTypeName;
        this.orderingForm = orderingForm;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SchemaQualifiedName getSchemaResolvedUserDefinedTypeName() {
        return schemaResolvedUserDefinedTypeName;
    }

    public OrderingForm getOrderingForm() {
        return orderingForm;
    }

}
